import { axios } from '@/utils/request'
import api from './index'

export function fetchAllGenDatasourceConf (params) {
  return axios({
    url: `${ api.GenDatasourceConf }/page`,
    method: 'get',
    params
  })
}

export function createGenDatasourceConf (data) {
  return axios({
    url: `${ api.GenDatasourceConf }/addGenDatasourceConf`,
    method: 'post',
    data
  })
}

export function updateGenDatasourceConf (id, data) {
  return axios({
    url: `${ api.GenDatasourceConf }/updateGenDatasourceConf/${id}`,
    method: 'put',
    data
  })
}

export function deleteGenDatasourceConf (id) {
  return axios({
    url: `${ api.GenDatasourceConf }/${id}`,
    method: 'delete'
  })
}
